package com.example.petadopt.controller;

import com.example.petadopt.controller.vo.Result;
import com.example.petadopt.dao.PetTypeDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/petType")
public class PetTypeController {
    @Autowired
    private PetTypeDao petTypeDao;

    @GetMapping("/getAll")
    public Result getAll(){
        return new Result(2000,"success",petTypeDao.findAll());
    }
}
